<template>
    <div class="mybuybuybuy" @click="qingqiu">
        <p>买买买</p>
    </div>
    <div class="mybuybuybuy1" v-if="showsuccess">
        <p>购买成功</p>
    </div>
</template>

<script>
export default{
    data(){
        return{
            showsuccess:false
        }
    },
    methods:{
        qingqiu(){
            this.showsuccess=true
            console.log("购买成功")
        }
    }
}
</script>

<style lang="scss" scoped>
.mybuybuybuy{
    width: 100px;
    height:100px;
    background-color: orange;
}
.mybuybuybuy1{
    width: 100px;
    height:100px;
    background-color: orange;
}
</style>